The present invention relates to a file accessing method and system in a computer system. More particularly, the present invention is concerned with a method and a system for making access to a file shared by a plurality of processors included in a multiprocessor system.
In general, in a computer system, an operating system (hereinafter referred to as OS for short) provides a file access macroinstruction so that a program running on the computer system can get rid of a burden of paying attention to a structure of an auxiliary storage unit in which files are stored.
It is sufficient for the program to have an input/output buffer disposed in a virtual area for issuing access macroinstructions (GET/PUT macros). Upon issuing of the access macroinstruction by a program, control is transferred to the OS (data manage part shown in FIG. 2), whereon the OS prepares a channel program suited to physical characteristics of the auxiliary storage unit. Further, the OS (hardware manage part and memory manage part shown in FIG. 2) fixes a page stored in a main storage and assigned to the input/output buffer and the channel program so that the page is not assigned to the other program and additionally translates a virtual address of the channel program to a real address, whereupon the channel is activated. This method is disclosed in Hajime Kamata's "TAJUU KASOU KIOKU OPEREITING SISUTEM (MULTIPLE VIRTUAL STORAGE OPERATING SYSTEM)", Ohm Company, PP. 81-95.
On the other hand, many large scale computer systems adopt a so-called loosely coupled multiple processor arrangement (hereinafter also referred to as LCMP for short) i.e. a multiprocessor system in which a plurality of individual processors are rather loosely coupled to one another. In an LCMP system, there will occur conflict or competition between programs running on the plural processors, respectively, in the access to a file. For evading such access competition, it is required to perform an exclusion control (or exclusion management, to say in another way) between the processors.
An exclusion manage or control method is disclosed in J-A-62-145349. According to this method, a given one of the processors is previously determined as a lock manager, wherein any other processor which desires to make access to a resource (file) issues to the lock manager a request for allowance of the access to the resource, whereon the former can proceed with processing in accordance with the response from the lock manager.